from django.db import models
from .create_string import create_stm

# Create your models here.


class Essay(models.Model):
    objects = None
    title = models.CharField(max_length=200)
    body = models.TextField()
    pub_time = models.DateTimeField('Date published')
    tag = models.CharField(max_length=100)
    if_show = models.BooleanField(null=True)
    rec_code = models.CharField(max_length=150,default=create_stm)

    def __str__(self):
        return self.title
